home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 6371 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: nef.ens.fr!drakkar!espie
  2. From: espie@drakkar.ens.fr (Marc Espie)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: alloca() on Amiga?
  5. Date: 27 Mar 1996 11:33:45 GMT
  6. Organization: Ecole Normale Superieure, Paris
  7. Message-ID: <4jb92p$6vc@nef.ens.fr>
  8. References: <2720tdg60.alamito@marketgraph.xs4all.nl>
  9. NNTP-Posting-Host: drakkar.ens.fr
  10. Keywords: alloca
  11.  
  12. In article <2720tdg60.alamito@marketgraph.xs4all.nl>,
  13. Ruud van Gaal <rvg@marketgraph.xs4all.nl> wrote:
  14. >Is there a nice way to get a working alloca() function for the Amiga?
  15. >It is present on all PC and Unix C implementations, but not on the Amiga.
  16. >(it allocates mem from the stack, automatically freeing it upon return from 
  17. >subroutine).
  18.  
  19. There is one in gcc when needed. There used to be some implementation of 
  20. alloca() for SAS/C, but I'm not sure it will work efficiently anymore 
  21. (as SAS/6.50 and above no longer feels like playing with the stackframe
  22. that much)... the idea was to just use each call to alloca() to check the
  23. stack frame and free all memory no longer in use.
  24.  
  25. Don't use it to develop new software, only for porting though, as using
  26. huge stacks is VERY unfriendly to the whole Amiga OS (crash-prone, 
  27. inefficient, and so on).
  28. -- 
  29. [nosave]<http://www.eleves.ens.fr:8080/home/espie/index.html>
  30. microsoft network is EXPLICITLY forbidden to redistribute this message.
  31. `Moon purismu powa, make up.... Tsuki ni kawatte, oshiokiyo !'
  32.     Marc Espie (Marc.Espie@ens.fr)
  33.